<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="org.lsms.dao.impl.*" %>

<% 
	DaoImpl impl_update = new DaoImpl();
	String loginname = session.getAttribute("username").toString();
	impl_update.update_login_times(loginname);
	session.setAttribute("logintimes",impl_update.get_user_login_times(loginname));
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>Author starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="LSMS,ICSEE,AUTHOR">
	
	<link rel="stylesheet" type="text/css" href="../css/author_layout.css">
	<link rel="stylesheet" type="text/css" href="../css/hyper_link_style.css">

  </head>
  
  <body>
	<div id="container">
		<div id="header" class="logo_image"></div>
		<div class="nav"></div>
		<div id="author_menu" class="border">
			<table border="0" width="100%"  >
				<tr>
					<td  bgcolor="#CCCCCC"><a href="../index.jsp">Home</a></td>
				</tr>
				<tr>
				<%
					DaoImpl impl = new DaoImpl();
					HashMap<String,Integer> hm = impl.get_site_setting();
					int paper_submit = hm.get("paper_submit");
					if(paper_submit==1){
				 %>
					<td  bgcolor="#CCCCCC"><a href="submit_paper.jsp">Submit Paper</a></td>
				<%
					}else{
				 %>
				 	<td  bgcolor="#CCCCCC"><a href="../error/submit_paper_forbidden.jsp">Submit Paper</a></td>	
				<%
					}
				 %>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="paper_history.jsp">History / Paper Status</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="register_info.jsp">Register Information</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="modify_info.jsp">Modify Information</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="../logout">Log Out</a></td>
				</tr>
			</table>
		</div>
		
		<div id="content" class="bg_color border" style="height:195px">
			<br>
			<b><span>Login Succeed!</span></b><br><br>
			<b><span>Hello, <%=session.getAttribute("username") %>!</span></b>
			<b><span>This is your
			 <%
			 int times = Integer.parseInt(session.getAttribute("logintimes").toString());
			 if(times==1)
			 	out.print("1st login!");
			 	
			 if(times==2)
			 	out.print("2nd login!");
			 
			 if(times==3)
			 	out.print("3rd login!");
			 	
			 if(times>3)
			 	out.print(times+"th login!");
			 %>
			  </span></b>
		</div>
		
		<div class="nav"></div>
			
		<div id="footer" class="footer_color border">
			<p align="center"><b>&copy;2010 LSMS-All Rights Reserved.</b></p>
			<p align="center"> <b>Powered by Shu.</b></p>
		</div>
	</div>
  </body>
</html>
